package com.imooc.project.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 时间购买
 * </p>
 *
 * @author jobob
 * @since 2021-07-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="TBuy对象", description="时间购买")
public class TBuy implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "购买ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "单号")
    private String buyNo;

    @ApiModelProperty(value = "通行证ID")
    private String userId;

    @ApiModelProperty(value = "通行证账号")
    private String userName;

    @ApiModelProperty(value = "用户姓名实名")
    private String realName;

    @ApiModelProperty(value = "购买单价")
    private BigDecimal buyPrice;

    @ApiModelProperty(value = "购买时长")
    private Integer buyDuration;

    @ApiModelProperty(value = "购买截止日期")
    private LocalDateTime buyClosingTime;

    @ApiModelProperty(value = "时间购买总额")
    private BigDecimal buyAmount;

    @ApiModelProperty(value = "手续费比例")
    private BigDecimal commissionRatio;

    @ApiModelProperty(value = "手续费总额")
    private BigDecimal commissionAmount;

    @ApiModelProperty(value = "交易总额")
    private BigDecimal allAmount;

    @ApiModelProperty(value = "0=未支付,1=交易中,2=交易结束,3=交易取消")
    private Integer status;

    @ApiModelProperty(value = "支付时间")
    private LocalDateTime payTime;

    @ApiModelProperty(value = "支付超时时间")
    private LocalDateTime payOutTime;

    @ApiModelProperty(value = "支付信息：支付通道,支付订单号,")
    private String payInfo;

    @ApiModelProperty(value = "剩余时长")
    private Integer surplusTime;

    @ApiModelProperty(value = "成交匹配时长")
    private Integer matchingTime;

    @ApiModelProperty(value = "成交匹配金额")
    private BigDecimal matchingAmount;

    @ApiModelProperty(value = "成交手续费")
    private BigDecimal matchingCommissionAmount;

    @ApiModelProperty(value = "完成交易时间")
    private LocalDateTime finishTime;

    @ApiModelProperty(value = "应退金额")
    private BigDecimal refundAmount;

    @ApiModelProperty(value = "是否已经申请开票,0=否,1=是")
    private Integer isInvoice;

    @ApiModelProperty(value = "开票状态:0=未开票,1=已开票")
    private Integer invoiceStatus;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "创建人")
    private String createUser;

    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "更新人")
    private String updateUser;

    @ApiModelProperty(value = "退款时间")
    private LocalDateTime refundTime;

    @ApiModelProperty(value = "退款状态0=未退款,1=已经退款")
    private Integer refundStatus;

    @ApiModelProperty(value = "订单提交通行证时间")
    private LocalDateTime paySubmintTime;


}
